﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BonjourHotel.Core.Localization;
using BonjourHotel.Core.Rooms;

namespace BonjourHotel.Application.Controls.Reservation
{
    public partial class ReservationCreation : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        private void ApplyLocalization()
        {

            lblCustomer.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Customer");
            lblAdult.Text = LocaleManager.GetLocaleString("controls.reservation.creation.AdultCount");
            lblChildren.Text = LocaleManager.GetLocaleString("controls.reservation.creation.ChildrenCount");
            lblRoom.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Room");
            lblArrival.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Arrival");
            lblDeparture.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Departure");
            lblBookingStatus.Text = LocaleManager.GetLocaleString("controls.reservation.creation.BookingStatus");
            lblNotes.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Notes");
            lblTreatments.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Treatments");
            lblDeposit.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Deposit");
            lblNotes.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Notes");
            lblPayment.Text = LocaleManager.GetLocaleString("controls.reservation.creation.Payment");
            lblPaymentNotes.Text = LocaleManager.GetLocaleString("controls.reservation.creation.PaymentNotes");
            btnSave.Text = LocaleManager.GetLocaleString("controls.common.save");
            btnClose.Text = LocaleManager.GetLocaleString("controls.common.close");

            ddBookingStatus.Items.Add(new ListItem(LocaleManager.GetLocaleString("controls.common.initialDropdownItem"), "0"));
            ddCustomer.Items.Add(new ListItem(LocaleManager.GetLocaleString("controls.common.initialDropdownItem"), "0"));
            ddRoom.Items.Add(new ListItem(LocaleManager.GetLocaleString("controls.common.initialDropdownItem"), "0"));
            ddTreatment.Items.Add(new ListItem(LocaleManager.GetLocaleString("controls.common.initialDropdownItem"), "0"));

            //Populate room combo
            RoomFacade roomFacade = new RoomFacade();
            ddRoom.DataSource = roomFacade.GetAllRooms();
            ddRoom.DataTextField = "Name";
            ddRoom.DataValueField = "idRoom";
            ddRoom.DataBind();
        }

    }
}